#55856: add if_not_exists=True to FAB migration#56100
#55856: add if_not_exists=True to FAB migration#56100vincbeck merged 1 commit intoapache:mainfrom plutaniano:main
Conversation
vincbeck
left a comment
There was a problem hiding this comment.
Could you explain more why we need this flag? Also, updating an existing migration is not recommended. It is better to create a new migration
|
@vincbeck All other tables in this migration have this flag set to Altering this migration should be fine, because it's there just to make sure that FAB tables exist. It's idempotent. Users that have already ran the migration will be in the same state as a user that is running the new version of the migration. |
You convinced me :) |
|
Yeah, this was likely an oversight on my part -- normally in migrations we don't need Thanks for the PR @plutaniano ! |
|
Hello, I saw the release of the |
Not sure about it, maybe @potiuk ? |
No. Constraints for previously released versions of Airflow will not be changed. See policy https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html#fixing-constraints-at-release-time You can always create your own constraints file. You don't have to use the one provided by the Airflow. |
|
Hello @ashb - Facing a similar issue when migrating from 2.10.4 to 3.1.0. Shouldn't similar changes be applied to the batch_alter_table during creation of indexes for the following ? idx_user_group_id For example, will be |
|
I'd say probably. Could you create a PR for it? |
|
yep, will do |
closes: #55856
Adds
if_not_exists=Trueto the FAB tableab_view_menuto match all other tables in this migration.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.